package com.example.home_model;

import com.example.common.mvvm.repository.BaseRepository;
import com.example.home_model.entity.VideoEntity;
import com.example.network_skd.BaseEntity;
import com.example.network_skd.SingletonRetrofit;

import java.util.Map;

import io.reactivex.Observable;

public class VideoRepository extends BaseRepository {
    public Observable<BaseEntity> queryHotFeedsList(Map<String, Object> map) {
        Integer feedId = (Integer) map.get("feedId");
        String feedType = (String) map.get("feedType");
        Integer pageCount = (Integer) map.get("pageCount");
        Integer userId = (Integer) map.get("userId");
        Observable<VideoEntity> videoEntityObservable = SingletonRetrofit.getInstance().getRetrofit()
                .create(ApiServer.class)

                .queryHotFeedsList(feedId,feedType,pageCount,userId);

        return checkNetWork(videoEntityObservable);

    }
}
